#-*- coding: utf-8 -*-
#! /usr/bin/python

import hashlib


def makesn(strs, soft='sbot'):
    '''
    soft是软件的发布版exe名字
    '''
    x = hashlib.sha224((hashlib.md5(strs)).hexdigest()+'jhfaixiaobao'+soft)
    #print x.hexdigest()
    return x.hexdigest()

print "Input the soft exe name:"
soft=raw_input()
print "Input the ww id:"
strs=raw_input()

print makesn(strs, soft)


def checksn(strs, sn):
    if(sn == makesn(strs)):
        print 'OK'
        return True
    else:
        print 'Error'
        return False

#makesn('水银镜子')
#makesn('长胡子的小羊')
#checksn('长胡子的小羊', '222')
#checksn('长胡子的小羊', '10465345fead0581da3f38ad4c1a288ad50c0bff85b24d3096d56fa5')
